{\rtf1\ansi\ansicpg936\deff0\nouicompat\deflang1033\deflangfe2052{\fonttbl{\f0\fnil\fcharset134 \'cb\'ce\'cc\'e5;}}
{\*\generator Riched20 10.0.19041}\viewkind4\uc1 
\pard\sa200\sl276\slmult1\f0\fs22\lang2052 # Automatic Compressive Sensing of Shack-Hartmann Sensors based on Vision Transformers\par
\par
This project focuses on the application of vision transformers in adaptive optics systems for automatic compressive sensing. The aim is to enhance system performance by utilizing advanced machine learning techniques to process optical data.\par
\par
## Getting Started\par
\par
These instructions will help you to set up the project on your local machine for development and testing purposes.\par
\par
### Directory Prerequisites\par
\par
Before executing any scripts, please create the following directories to ensure the proper functioning of the software. These directories are necessary to store training data, testing data, and results:\par
\par
#### Essential Directories\par
- `training_data/` - For storing training datasets.\par
- `testing_data/different_mag` - For storing testing datasets with varying magnitudes.\par
- `testing_data/different_r0` - For storing testing datasets with varying r0 parameters.\par
\par
#### Result Data Directories\par
- `result/azimuthal_average_of_image/bestPSF/` - For storing the best PSF results.\par
- `result/azimuthal_average_of_image/CNN/normalized/` - For normalized CNN results.\par
- `result/azimuthal_average_of_image/CNN/unnormalized/` - For unnormalized CNN results.\par
- `result/azimuthal_average_of_image/Vision_Transformer/normalized/` - For normalized results from the Vision Transformer.\par
- `result/azimuthal_average_of_image/Vision_Transformer/unnormalized/` - For unnormalized results from the Vision Transformer.\par
\par
#### Additional Result Directories\par
- `result/detailed_soapy_test_result/` - For detailed Soapy test results.\par
- `result/pv_calculation_for_detailed_soapy_test_result_supplyment/` - For PV calculations supplementary to detailed Soapy test results.\par
- `result/soapy_test_result/` - For general Soapy test results.\par
\par
You can create these directories manually through your file explorer or use the command line:\par
```bash\par
mkdir -p training_data testing_data/different_mag testing_data/different_r0 result/azimuthal_average_of_image/bestPSF result/azimuthal_average_of_image/CNN/normalized result/azimuthal_average_of_image/CNN/unnormalized result/azimuthal_average_of_image/Vision_Transformer/normalized result/azimuthal_average_of_image/Vision_Transformer/unnormalized result/detailed_soapy_test_result result/pv_calculation_for_detailed_soapy_test_result_supplyment result/soapy_test_result\par
\par
#### Troubleshooting\par
If the software reports errors about missing directories during execution, please create them as indicated in the error messages. This step is necessary to accommodate components of the software that dynamically generate and store data in specific directories not listed above.\par
\par
This setup ensures that the directory structure adapts to your specific setup and use cases, facilitating a smooth operation of the project.\par
\par
### Environment Prerequisites\par
\par
You need to create two separate conda environments as specified in the project files `model_training.yml` and `training_data_generation_and_model_testing.yml`.\par
\par
#### To set up the model training environment:\par
conda env create -f model_training.yml\par
\par
#### To set up the data generation and model testing environment:\par
conda env create -f training_data_generation_and_model_testing.yml\par
\par
### Installation\par
\par
Download the project directly from the source and copy all necessary files into your working directory. \par
\par
## Usage\par
\par
Ensure that you have set the project\rquote s root directory as the work directory. Activate the appropriate conda environment and run the corresponding script for your specific task. Detailed purposes of each script are provided within the file descriptions in the project directory.\par
\par
## License\par
\par
This project is licensed under the MIT License - see the LICENSE.md file for details.\par
\par
## Authors\par
\par
* **Qingyang Zhang** - *Initial work*\par
\par
## Acknowledgments\par
\par
* Heartfelt gratitude to Dr. Zuo Heng for his insightful guidance and for providing the computational resources essential for the completion of this research.\par
\par
For more detailed information on individual scripts, please refer to their specific descriptions within the project repository.\par
}
 